import Taro, { Component } from '@tarojs/taro'
import {View, Input, Button, Picker} from '@tarojs/components'
import { AtList, AtListItem } from 'taro-ui'
import qs from 'qs'

export default class attendance extends Component {

  config = {
    navigationBarTitleText: this.state.title
  };

  constructor (props) {
    super(props);
    this.state = {
      title: '工资详情',
    }
  }

  componentDidMount () {
    /*let array = window.location.hash.split('?');
    if (array.length>1){
      let obj = qs.parse(array[1]);
      let detailData = JSON.parse(obj.detailData);
      this.setState({...detailData, title: `${detailData.month}社保明细`})
    }*/
  }

  render () {
    let { ...data } = this.state;
    return (
      <View className='fontSize'>
        <View style='padding: 20pt 0 10pt 10pt; color: #cccccc'>养老保险：</View>
        <AtList>
          <AtListItem title='基数' extraText={parseFloat('5000').toFixed(2)} />
          <AtListItem title='个人缴纳' extraText={parseFloat('1000').toFixed(2)} />
          <AtListItem title='公司缴纳' extraText={parseFloat('4000').toFixed(2)} />
        </AtList>

        <View style='padding: 20pt 0 10pt 10pt; color: #cccccc'>生育保险：</View>
        <AtList>
          <AtListItem title='基数' extraText={parseFloat('5000').toFixed(2)} />
          <AtListItem title='个人缴纳' extraText={parseFloat('1000').toFixed(2)} />
          <AtListItem title='公司缴纳' extraText={parseFloat('4000').toFixed(2)} />
        </AtList>
      </View>
    )
  }
}
